import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/UserServiceAgreement'
    // redirect: '/QqLogin'
  },
  {
    path: '/UserServiceAgreement', //temper用户协议
    name: 'UserServiceAgreement',
    component: () => import('../views/UserServiceAgreement.vue')
  },
  // {
  //   path: '/ServiceAgreement', //心动30S服务协议
  //   name: 'ServiceAgreement',
  //   component: () => import('../views/ServiceAgreement.vue')
  // },
  {
    path: '/PrivacyAgreement', //temper隐私协议
    name: 'PrivacyAgreement',
    component: () => import('../views/PrivacyAgreement.vue')
  },
  {
    path: '/Cancellation', //Temper注销账户须知
    name: 'Cancellation',
    component: () => import('../views/Cancellation.vue')
  },
  // {
  //   path: '/CommonProblem', //常见问题
  //   name: 'CommonProblem',
  //   component: () => import('../views/CommonProblem.vue')
  // },
  {
    path: '/download', //下载页
    name: 'download',
    component: () => import('../views/download.vue')
  },
  {
    path: '/QqLogin', //QQ登录
    name: 'QqLogin',
    component: () => import('../views/QqLogin.vue'),
    meta:{
      title:'授权登陆'
    }
  },
  {
    path: '/QqBack', //QQ登录回调
    name: 'QqBack',
    component: () => import('../views/QqBack.vue')
  },
  {
    path: '*', //QQ登录回调
    name: 'QqBack',
    component: () => import('../views/QqBack.vue')
  },
  {
    path: '/ChatSquare', //广场
    name: 'ChatSquare',
    component: () => import('../views/ChatSquare.vue'),
    meta:{
      title:'广场'
    }
  },
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router